namespace SimpleWebServices.Net.Mail
{
    using System;
    using System.IO;
    using System.Net.Mail;

    public sealed class XmlAttachment : Attachment
    {
        public XmlAttachment(Stream stream, string name)
            : base(stream, name, "application/xml")
        {
            DateTime date = DateTimeFactory.UtcNow;
            this.ContentDisposition.CreationDate = date;
            this.ContentDisposition.ModificationDate = date;
            this.ContentDisposition.ReadDate = date;
            this.ContentDisposition.Inline = false;
        }
    }
}